from mod_verbs import Verb
import mod_item,mod_gui

class Heal(Verb):
    def __init__(self,amount):
        Verb.__init__(self,'HEAL','BUTTON_HEAL',4)
        self.amount = amount
        
    def doIt(self,actor,item,target):
        actor.useAP(self.AP)
        item.setLocation(None)
        actor.setHP(actor.HP+self.amount)
        mod_gui.theGUI.messages.append(actor.glyph+' USES A MEDPACK.')
        
medpackPrototype = mod_item.ItemPrototype('MEDPACK',grabbable=True)
medpackPrototype.verbs.append(Heal(5))